Handheld electronic devices, such as smartphones, tablets, and e-book readers, are frequently used with covers that protect their screens and can be peeled off while in use. It is increasingly common for such devices to be able to detect the state of the cover and take an action based on the detected state. For example, many screen covers cause the display screen of the electronic device to turn off when the cover is closed. It is expected that covers for electronic devices will eventually be instrumented so that gestures, such as bending the cover or one of the corners of the cover, or peeling the cover off of the electronic device, can be detected and used for user input.